//
//  Report.h
//  alotOf
//
//  Created by Mac_Black_Mini on 2025/9/2.
//

#import <Foundation/Foundation.h>
#import "Node+CoreDataClass.h"
NS_ASSUME_NONNULL_BEGIN

@interface Report : NSObject

@property (nonatomic, copy) NSString *app_version;
@property (nonatomic, copy) NSString *bundle;
@property (nonatomic, copy) NSString *uuid;
/// [connect,disconnect]
@property (nonatomic, copy) NSString *connect_way;
/// [0未到达, 1连接成功, 2连接失败]，这里的成功即连接后有网的成功
@property (nonatomic, copy) NSString *connect_result;
@property (nonatomic, copy) NSString *net_type;
@property (nonatomic, copy) NSString *operator;
@property (nonatomic, copy) NSString *language;
@property (nonatomic, copy) NSString *first_install_time;
@property (nonatomic, copy) NSString *last_upgrade_time;
@property (nonatomic, copy) NSString *session_id;
/// 连接持续时间，也就是连接开始到检测有网的耗时，单位 s
@property (nonatomic, copy) NSString *connect_duration;
/// 一次会话的总耗时，单位 s
@property (nonatomic, copy) NSString *session_duration;
/// [ip/domain]                 根据此进行ip或者域名的成功/失败的统计
@property (nonatomic, copy) NSString *node_server;
/// [trojan/vless/vmess...]
@property (nonatomic, copy) NSString *node_protocol;
/// create_time
@property (nonatomic, copy) NSString *connect_event_time;
/// 连接成功和失败会发送 test_duration，test_duration 是连上后，测试网络情况的用时，比如测试google的耗时，单位 s
@property (nonatomic, copy) NSString *test_duration;
@property (nonatomic, copy) NSString *node_id;

+ (Report *)infoWithNode:(Node *)node;

@end

NS_ASSUME_NONNULL_END
